//
// Created by wze-zero on 2024/10/21.
//
#include <iostream>
#include <cmath>

using namespace std;

bool check(long long num) {
    long long temp = num / 10;
    string s;
    while (temp % 10) {
        s += to_string(temp % 10);
        temp /= 10;
    }
    s = to_string(num) + s;
    temp = stoll(s);
    for (int i = 2; i < sqrt(temp); ++i) {
        if (temp % i == 0) {
            return false;
        }
    }
    return true;
}

int main() {
    long long num;
    cin >> num;
    check(num) ? cout << "prime" << endl : cout << "noprime" << endl;
    return 0;
}